<?php
/*code here*/
/* Redirect user if they already logged */
if(Auth::hasAuth('current_user')){
    //$this->view->current_user = Auth::getAuth('current_user');

}
else{
    header('location: /');
}

    $auth = Auth::getAuth('current_user');
    $user_level_id = $auth['user_level_id'];
        // Allow User View
        functions::redirection_user($user_level_id);
/*code here(end)*/

$search = new Search();

if(isset($_GET['formID'])){
	$id = $_GET['formID'];
	$countReports = count($search->getPrintReports("WHERE form_name LIKE '%" . $search_value ."%' AND company_id={$db->escape($auth['company_id'])} AND id = '". $id ."'"));
	if($countReports==0){
		// header("location:/user_view/error");
	}
}
$this->setLayout();